$OpenBSD: patch-index_php,v 1.3 2013/11/01 14:02:50 robert Exp $
--- index.php.orig	Tue Sep 17 16:16:20 2013
+++ index.php	Fri Nov  1 12:02:35 2013
@@ -122,6 +122,22 @@ include_once('lib/request/requestprocessor.php');
 include_once('config.php');
 include_once('version.php');
 
+// Define apache_request_headers() in case we are using nginx or lighttpd
+// as a webserver and not apache.
+if (!function_exists("apache_request_headers")) {
+	function apache_request_headers() {
+		$headers = array();
+		foreach ($_SERVER as $key => $value) {
+			if (substr($key, 0, 5) != 'HTTP_') {
+				continue;
+			}
+			$headername = strtr(ucwords(strtolower(strtr(substr($key, 5), '_', ' '))), ' ', '-');
+			$headers[$headername] = $value;
+		}
+
+		return $headers;
+	}
+}
 
     // Attempt to set maximum execution time
     ini_set('max_execution_time', SCRIPT_TIMEOUT);
@@ -292,4 +308,4 @@ include_once('version.php');
 
     // end gracefully
     ZLog::Write(LOGLEVEL_DEBUG, '-------- End');
-?>
\ No newline at end of file
+?>
